import axios from './index'
// import request from 'axios'
// 发布求购、收购消息
export const sendMessage = (param) => {
  return axios.httpRequest({
    url: 'message/add.do',
    method: 'post',
    data: param
  })
}
// 获取所有的收购求购消息
export const getAllMessages = () => {
  return axios.getRequest({
    url: 'message/getAllMessages.do',
    method: 'get'
  })
}
// export const getAllMessages = (param) => {
//   return request.get('/static/json/card.json')
// }

// 获取单个信息详情
export const getDescMessage = (param) => {
  return axios.getRequest({
    url: 'message/getOneMessage/byId',
    method: 'get',
    params: param
  })
}
